/*    */ package com.zimbra.cs.dav.service;
/*    */ 
/*    */ import com.zimbra.common.util.ZimbraLog;
/*    */ import com.zimbra.cs.servlet.ZimbraServlet;
/*    */ import java.io.IOException;
/*    */ import javax.servlet.ServletException;
/*    */ import javax.servlet.http.HttpServletRequest;
/*    */ import javax.servlet.http.HttpServletResponse;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class DavWellKnownServlet
/*    */   extends ZimbraServlet
/*    */ {
/*    */   public void service(HttpServletRequest req, HttpServletResponse resp)
/*    */     throws ServletException, IOException
/*    */   {
/* 33 */     ZimbraLog.clearContext();
/* 34 */     addRemoteIpToLoggingContext(req);
/* 35 */     ZimbraLog.addUserAgentToContext(req.getHeader("User-Agent"));
/* 36 */     String path = req.getPathInfo();
/* 37 */     if ((path.equalsIgnoreCase("/caldav")) || (path.equalsIgnoreCase("/carddav"))) {
/* 38 */       resp.setStatus(301);
/* 39 */       resp.setHeader("Location", req.getScheme() + "://" + req.getServerName() + ":" + req.getServerPort() + "/dav");
/*    */     } else {
/* 41 */       resp.sendError(404);
/*    */     }
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/dav/service/DavWellKnownServlet.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */